import { http } from "@/utils/http";

type ResultTable = {
  total?: number;
  data?: Array<any>;
};

//化学品载入 总表
export const loadSummaryqueryListPage = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/waterChemicalLoad/queryListPage`, {
    data
  });
};

//一般化学品载入 查询列表
export const generalqueryListPage = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalChemical/queryListPage`, {
    data
  });
};

//一般化学品载入 详情
export const generalqueryDetail = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalChemical/queryDetail`, {
    data
  });
};

//一般化学品载入 新增
export const generalqueryadd = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalChemical/add`, {
    data
  });
};

//一般化学品载入 删除
export const generalquerydeleted = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalChemical/delete`, {
    data
  });
};

//一般化学品载入 更新
export const generalqueryupdate = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalChemical/update`, {
    data
  });
};

//一般化学品载入 用量查询
export const generalChemicalqueryChemicalUseInfo = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalChemical/queryChemicalUseInfo`, {
    data
  });
};

//易制毒化学品购进台账 查询列表
export const precursorChemicalLoadqueryListPage = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/queryListPage`, {
    data
  });
};

//易制毒化学品购进台账 新增
export const precursorChemicalLoadadd = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/add`, {
    data
  });
};

//易制毒化学品购进台账 删除
export const precursorChemicalLoaddelete = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/delete`, {
    data
  });
};

//易制毒化学品购进台账 详情
export const precursorChemicalLoadqueryDetail = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/queryDetail`, {
    data
  });
};

//易制毒化学品购进台账 更新
export const precursorChemicalLoadupdate = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/update`, {
    data
  });
};

//易制毒化学品出入库台账 出入库台账
export const precursorChemicalLoadledger = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/ledger`, {
    data
  });
};

//易制毒化学品购进台账 出库
export const precursorChemicalLoadoutbound = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/outbound`, {
    data
  });
};

//化学品用量记录 查询列表
export const chemicalConsumequeryListPage = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/chemicalConsume/queryListPage`, {
    data
  });
};

//化学品用量记录 新增
export const chemicalConsumeadd = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/chemicalConsume/add`, {
    data
  });
};

//化学品用量记录 更新
export const chemicalConsumeupdate = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/chemicalConsume/update`, {
    data
  });
};

//化学品用量记录 详情
export const chemicalConsumequeryDetail = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/chemicalConsume/queryDetail`, {
    data
  });
};

//一般化学品载入 查询系统化学品 新增-更新用
export const generalChemicalquerySystemChemicals = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalChemical/querySystemChemicals`, {
    data
  });
};

//用量统计和用量记录 页面的下拉框查询化学品名称
export const commonqueryChemicalNameBySystem = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/common/queryChemicalNameBySystem`, {
    data
  });
};

//用量统计和用量记录 页面的下拉框查询化学品名称(新)
export const commonqueryChemicalNameBySystemForDaily = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/common/queryChemicalNameBySystemForDaily`, {
    data
  });
};

//
export const generalChemicalqueryChemicalName = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalChemical/queryChemicalName`, {
    data
  });
};

//易制毒化学品 查询购买许可证
export const precursorChemicalLoadqueryPurchaseLicense = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/queryPurchaseLicense`, {
    data
  });
};

//点位时间段第一值和最后一个值
export const commonqueryScadaIntervalValue = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/common/queryScadaIntervalValue`, {
    data
  });
};

//易制化学品载入 查询系统化学品 新增-更新用
export const precursorChemicalLoadquerySystemChemicals = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/querySystemChemicals`, {
    data
  });
};

//易制化学品载入 查询系统化学品 列表
export const precursorChemicalLoadqueryChemicalName = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/queryChemicalName`, {
    data
  });
};

//载入报表 查询
export const chemicalReportqueryLoadReport = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/chemicalReport/queryLoadReport`, {
    data
  });
};
//消耗报表 查询
export const chemicalReportqueryConsumeReport = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/chemicalReport/queryConsumeReport`, {
    data
  });
};

//易制毒购买证 查询列表
export const precursorChemicalPurchasePermitqueryListPage = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalPurchasePermit/queryListPage`, {
    data
  });
};

//易制毒购买证 新增
export const precursorChemicalPurchasePermitadd = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalPurchasePermit/add`, {
    data
  });
};

//易制毒购买证 删除
export const precursorChemicalPurchasePermitdelete = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalPurchasePermit/delete`, {
    data
  });
};

//易制毒购买证 修改
export const precursorChemicalPurchasePermitupdate = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalPurchasePermit/update`, {
    data
  });
};

//易制毒购买证 详情
export const precursorChemicalPurchasePermitqueryDetail = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalPurchasePermit/queryDetail`, {
    data
  });
};

//易制毒购买证 化学品下拉框
export const precursorChemicalPurchasePermitqueryChemicalList = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalPurchasePermit/queryChemicalList`, {
    data
  });
};

//检查项 查询列表
export const checkItemqueryList = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/checkItem/queryList`, {
    data
  });
};

//易制毒化学品 联系厂商用量查询
export const precursorChemicalLoadqueryChemicalUseInfo = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/queryChemicalUseInfo`, {
    data
  });
};

//易易制毒化学品 购买证下拉框
export const precursorChemicalLoadqueryPurchasePermitList = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/queryPurchasePermitList`, {
    data
  });
};

//易制毒化学品 查询化学品载进时间和液位
export const precursorChemicalLoadqueryChemicalLoadTimeAndLevel = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/queryChemicalLoadTimeAndLevel`, {
    data
  });
};

//一般化学品载入 查询化学品载进时间和液位
export const generalChemicalqueryChemicalLoadTimeAndLevel = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalChemical/queryChemicalLoadTimeAndLevel`, {
    data
  });
};

//一般化学品载入 查询Po下拉框
export const generalChemicalqueryChemicalPoDropDownList = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalChemical/queryChemicalPoDropDownList`, {
    data
  });
};

//易制毒化学品载入 查询Po下拉框
export const precursorChemicalLoadqueryChemicalPoDropDownList = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/precursorChemicalLoad/queryChemicalPoDropDownList`, {
    data
  });
};
